import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import LoginView from "./views/LoginView.vue";
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import App from "./App.vue";
import router from "./router/router.js";

const app = createApp(App)

app.use(ElementPlus, {
    locale: zhCn,
})   // 在整个前端中使用element-plus前端框架和配置国际化（zhCn语言包）
// 注册所有图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
app.use(router) // 注册路由组件
app.mount('#app')   // 将整个前端项目挂载到id为app的div上
